// Created on 17 juil. 07
package com.cofluent.web.client.widget;

import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Widget;

/**
 *
 * @author Christophe MOINE
 */
public class YesNoDialogBox extends DialogBox
{
	private Button yes;

	public Button getYesButton()
	{
		return yes;
	}

	public YesNoDialogBox(String message)
	{
		// Set the dialog box's caption.
		setText(message);

		yes=new Button("Yes");
		yes.addClickListener(new ClickListener() {
			public void onClick(Widget sender) {
				hide();
			}
		});
		Button no = new Button("No");
		no.addClickListener(new ClickListener() {
			public void onClick(Widget sender) {
				hide();
			}
		});
		HorizontalPanel panel=new HorizontalPanel();
		panel.add(yes);
		panel.add(no);
		setWidget(panel);
	}

	
}
